package com.webwork.common.util;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

/**
 * Dao封装方法
 *
 */
public final class DaoUtil {

	/**
	 * 获得时间戳字段毫秒
	 * 
	 * @param rs ResultSet
	 * @param dbColumn 字段
	 * @return
	 * @throws SQLException
	 */
	public Long getTimestamp(ResultSet rs, String dbColumn) throws SQLException {
		Timestamp ret;
		if ((ret = rs.getTimestamp(dbColumn)) == null) {
			return null;
		}
		return ret.getTime();
	}
	
}
